package com.lsk.util;

public class JsonUntil {
    private boolean success = true;
    private String code;  //返回接口的状态
    private String msg;   //返回接口的提示
    private Long count; //返回接口的数据总量
    private Object obj; //返回接口的数据
    private Object data; //返回接口的数据
    public JsonUntil(boolean success, String code, String msg) {
        this.success = success;
        this.code = code;
        this.msg = msg;
    }
    public static JsonUntil error(String msg) {
        return new JsonUntil(false, "100001", msg);
    }

    public JsonUntil(String code, String msg, Object data, Object obj) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.obj = obj;
    }
    public JsonUntil(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public JsonUntil(String code, String msg, Long count, Object data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }
    public JsonUntil() {
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public Object getData() {
        return data;
    }
    public void setData(Object data) {
        this.data = data;
    }
    public JsonUntil(String code) {
        this.code = code;
    }
    public Long getCount() {
        return count;
    }
    public void setCount(Long count) {
        this.count = count;
    }
    @Override
    public String toString() {
        return "JsonUntil{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", count=" + count +
                ", data=" + data +
                ", obj=" + obj +
                '}';
    }
    public boolean isSuccess() {
        return success;
    }
    public void setSuccess(boolean success) {
        this.success = success;
    }
    public Object getObj() {
        return obj;
    }
    public void setObj(Object obj) {
        this.obj = obj;
    }
}
